/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Helper;

import java.awt.Component;
import javax.swing.JOptionPane;

/**
 *
 * @author luc0
 */
public class ErrorHandler {


    public static void invalidPortMessage(Component parent){
        JOptionPane.showMessageDialog(parent, "Please enter a valid Port! (2000-48000)!", "Error",JOptionPane.ERROR_MESSAGE);
    }


    public static void errorWithPortMessage(Component parent){
        JOptionPane.showMessageDialog(parent, "Error with port! Maybe it is reserverd? Please try another!", "Error",JOptionPane.ERROR_MESSAGE);
    }


    public static void notEnoughButtonsMessage(Component parent){
        JOptionPane.showMessageDialog(parent, "Please add at least one button to the controller!", "Error",JOptionPane.ERROR_MESSAGE);
    }


    public static void menuPlaceHolderMessage(Component parent){
         JOptionPane.showMessageDialog(parent, "Placeholder for Menu button on the iPhone", "Info",JOptionPane.INFORMATION_MESSAGE);
    }

    public static void invalidControllerDataMessage(Component parent){
        JOptionPane.showMessageDialog(parent, "Error with Controller! Contains invalid data!", "Error",JOptionPane.ERROR_MESSAGE);
    }

    public static void errorWhileLoadingMessage(Component parent){
        JOptionPane.showMessageDialog(parent, "Error while loading controller! Contains invalid data!", "Error",JOptionPane.ERROR_MESSAGE);
    }
    
    public static void invalidHeight(Component parent){
         JOptionPane.showMessageDialog(parent, "Please enter a valid height!", "Error",JOptionPane.ERROR_MESSAGE);
    }
    
    public static void invalidWidth(Component parent){
         JOptionPane.showMessageDialog(parent, "Please enter a valid width!", "Error",JOptionPane.ERROR_MESSAGE);
    }


}
